<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="../node_modules/vue/dist/vue.global.js"></script>
  </head>
  <body>
    <div id="app"></div>
    <script>
      const { render, h, getCurrentInstance } = Vue
      const MyComponent = {
        setup() {
          return () => h('p', {}, '123')
        }
      }

      const VueComponent = {
        setup(props, ctx) {
          const internalInstance = getCurrentInstance()
          const clickHandle = () => {
            alert('111')
            console.log(internalInstance.proxy.$refs)
          }

          return () => h(MyComponent, { ref: 'myRef', onClick: clickHandle })
        }
      }

      render(h(VueComponent), document.getElementById('app'))
    </script>
  </body>
</html>
